#include <reg52.h>

unsigned int pwmL=0,pwmR=0,t=0;

sbit ENL=P0^0;
sbit ENR=P0^7;

void Timer0_Init()
{ 
	TMOD|=0X01;
	TH0=(65536-100)/256;
	TL0=(65536-100)%256;
	ET0=1;
	TR0=1;
	EA=1;
}

void Timer0_Routinue() interrupt 1
{ 
  TH0=(65536-100)/256;
	TL0=(65536-100)%256;
	   t++;
	if(t<pwmL)
   	 ENL=1;
	else
		ENL=0;
	if(t<pwmR)
		ENR=1;
	else
		ENR=0;
	if(t>=100)
		t=0;
}